package cn.com.roy.thread.t3_1_3.test5;

public class MyService {
    public void testMethod(Object lock){
        try{
           synchronized (lock){
               System.out.println(Thread.currentThread().getName() + " wait begin" );
               lock.wait(1000);
               System.out.println(Thread.currentThread().getName() + " wait end" );
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
